<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<style>
table{border-collapse:collapse;}
th {background-color:#ddd;}
th, td{border:1px solid #000; padding:5px;}
a{border-collapse:collapse;background-color:#ddd;color:#000; padding:3px;}
</style>

<h1>Edit robot</h1>
<c:if test="${error == '1'}">
	${message}<br />
	<a href="<c:url value="/forms/robot/list"></c:url>">zpet</a>
</c:if>

<c:if test="${error == '0'}">
<form action="<c:url value="/forms/robot/save"></c:url>" method="post" commandName="addForm">
	<ul>
		<li>
			jmeno robota: <input name="name" type="text" value="${robot.getName()}" />
		</li>
		<li>
			verze robota: <input name="version" type="text" value="${robot.getVersion()}" />
		</li>
		<li>
			popis robota: <textarea name="description" />${robot.getDescription()}</textarea>
		</li>
		<li>
			<select name="parts" multiselect>
			
			</select>
		</li>
        <li>
        	<input type="hidden" value="${robot.getId()}" name="id" />
            <input type="submit" value="Ulozit"/>
        </li>
    </ul>
</form>
</c:if>	